package com.wanqing.community.dao;

import java.util.List;

import com.wanqing.community.bean.DepartmentBean;
import com.wanqing.community.util.ConditionParse;

/**
 * 部门管理DAO接口
 */
public interface DepartmentDao {

	/**
	 * <p>Description:根据查询条件查询部门信息<p>
	 * <p>modifiContent:</p>
	 * @param condParse
	 * @return
	 */
	List<DepartmentBean> queryDepartment(ConditionParse parse);
	
	/**
	 * <p>Description:根据条件得到部门的数量<p>
	 * <p>modifiContent:</p>
	 * @param condParse
	 * @return
	 */
	int getDepartmentCount(ConditionParse condParse);
	
	/**
	 * <p>Description:修改部门的是否为根<p>
	 * <p>modifiContent:<p>
	 * @param dleaf
	 * @param id
	 * @return
	 */
	int updateDepartmentLeaf(boolean dleaf,String id);
	
	/**
	 * <p>Description:添加部门<p>
	 * <p>modifiContent:<p>
	 * @param department
	 * @return
	 */
	int addDepartment(DepartmentBean department);
	
			
	/**
	 * <p>Description:删除部门<p>
	 * <p>modifiContent:<p>
	 * @param list
	 * @return
	 */
	int deleteDepartment(List<String> list);
	
	/**
	 * <p>Description:采用递归删除部门以及其下属部门<p>
	 * <p>modifiContent:<p>
	 * @param orgId
	 * @return
	 */
	int deleteDepartment(String orgId);
	
	/**
	 * <p>Description:修改部门<p>
	 * <p>modifiContent:<p>
	 * @param department
	 * @return
	 */
	int updateDepartment(DepartmentBean department);
	
	/**
	  * <p>Description:根据ID查找部门<p>
	  * @author jx
	  * @version 2015-07-02
	  * @modifier jx
	  * @modifiDate 2015-07-02
	  * <p>modifiContent:<p>
	  * @param dId
	  * @return
	  */
	DepartmentBean findDepartmentById(String dId);
}
